require('./Page<%=Name %>.less');

<% if (store) { %>
import Reflux from 'reflux';
import ReactMixin from 'react-mixin';
import Actions from './Actions'
import Store from './Store';
<% } %>

class <%- Name %> extends React.Component {
    constructor(props) {
        super(props);

    }

    render() {
        return (
            <div className="<%= name %>">

            </div>
        );
    }

    componentWillMount() {

    }

    componentDidMount() {

    }

    shouldComponentUpdate(nextProps, nextState) {
        const thisProps = this.props || {},
        thisState = this.state.<%- name %> || {};
        if (Object.keys(thisProps).length !== Object.keys(nextProps).length || Object.keys(thisState).length !== Object.keys(nextState).length) {
            return true;
        }
        for (const key in nextProps) {
            if (thisProps[key] !== nextProps[key]) {
                console.log(thisProps[key], nextProps[key]);
                return true;
            }
        }
        for (const key in nextState) {
            if (thisState[key] !== nextState[key]) {
                return true;
            }
        }
        return false;
    }



}
<% if (store) { %>
ReactMixin.onClass(<%- Name %>, Reflux.connect(Store, '<%- name %>'));
<% } %>

export default <%- Name %> ;
